package club.kunlingou.dsc.blog.domain;

import java.nio.charset.Charset;
import java.util.Date;

import club.kunlingou.dsc.common.domain.BaseEntity;

/**
 * 文章信息
 * @author kunlingou
 *
 */
public class ArticleInfo extends BaseEntity{
	
	private Date createTime;
	
	private Date modifyTime;
	
	private String title;
	
	private byte[] content;
	private String contentStr;
	
	private String author;
	
	private int pageView;

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContentStr() {
		if(content != null) {
			return new String(content,Charset.forName("UTF-8"));
		}
		return contentStr;
	}

	public void setContentStr(String contentStr) {
		this.contentStr = contentStr;
	}

	public byte[] getContent() {
		return content;
	}

	public void setContent(byte[] content) {
		this.content = content;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public int getPageView() {
		return pageView;
	}

	public void setPageView(int pageView) {
		this.pageView = pageView;
	}
	
}
